* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.game-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    max-width: 500px;
    width: 100%;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.game-header h1 {
    font-size: 24px;
    color: #333;
}

.score-container {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

#game-canvas {
    background-color: #e0e0e0;
    display: block;
    margin: 0 auto;
    border: 2px solid #333;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

button {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

#pause-btn {
    background-color: #2196F3;
}

#pause-btn:hover {
    background-color: #0b7dda;
}

#restart-btn {
    background-color: #f44336;
}

#restart-btn:hover {
    background-color: #d32f2f;
}

.instructions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.instructions h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.instructions p {
    margin-bottom: 8px;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 500px) {
    #game-canvas {
        width: 100%;
        height: auto;
    }
    
    .game-header {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    button {
        width: 100%;
    }
}